﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;
using System.Reflection;

namespace YiSha.Entity.YiDongYuan
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2021-06-16 23:04
    /// 描 述：检测机械信息实体类
    /// </summary>
    [Table("detectionmechanics")]
    public class DetectionMechanicsEntity : BaseModifyEntity
    {
        /// <summary>
        /// 所属区域
        /// </summary>
        public string Region { get; set; }

        /// <summary>
        /// 所有人或单位名字
        /// </summary>
        /// <returns></returns>
        public string OwnerName { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        /// <returns></returns>
        public string OwnerTel { get; set; }

        /// <summary>
        /// 证件号码
        /// </summary>
        /// <returns></returns>
        public string OwnerCardNo { get; set; }

        /// <summary>
        /// 证件照片
        /// </summary>
        /// <returns></returns>
        public string OwnerCard_Pic { get; set; }

        /// <summary>
        /// 使用地点
        /// </summary>
        /// <returns></returns>
        public string OwnerAddr { get; set; }

        /// <summary>
        /// 环保机械代码
        /// </summary>
        /// <returns></returns>
        public string HuanBaoCode { get; set; }

        /// <summary>
        /// 机械登记类型
        /// </summary>
        /// <returns></returns>
        public string JXDJLX { get; set; }

        /// <summary>
        /// 机械类别
        /// </summary>
        /// <returns></returns>
        public string JXLB { get; set; }

        /// <summary>
        /// 排放阶段
        /// </summary>
        /// <returns></returns>
        public string PFJD { get; set; }

        /// <summary>
        /// 燃料种类/电动
        /// </summary>
        /// <returns></returns>
        public string RLLX { get; set; }

        /// <summary>
        /// 机械型号
        /// </summary>
        /// <returns></returns>
        public string JXXH { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string JXVIN { get; set; }

        /// <summary>
        /// 机械环保代码
        /// </summary>
        /// <returns></returns>
        public string JXHBDM { get; set; }

        /// <summary>
        /// 机械出厂编号
        /// </summary>
        /// <returns></returns>
        public string JXCCBH { get; set; }

        /// <summary>
        /// 机械制造企业
        /// </summary>
        /// <returns></returns>
        public string JXZZQY { get; set; }

        /// <summary>
        /// 机械出厂年月
        /// </summary>
        /// <returns></returns>
        public string JXCCRQ { get; set; }

        /// <summary>
        /// 场内号牌
        /// </summary>
        /// <returns></returns>
        public string CNHP { get; set; }

        /// <summary>
        /// 原有号牌
        /// </summary>
        /// <returns></returns>
        public string YYHP { get; set; }

        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public string GpsNo { get; set; }

        /// <summary>
        /// 其他号码
        /// </summary>
        /// <returns></returns>
        public string other_number { get; set; }

        /// <summary>
        /// 其他照片
        /// </summary>
        /// <returns></returns>
        public string other_pic { get; set; }

        /// <summary>
        /// 环保信息公开编号
        /// </summary>
        /// <returns></returns>
        public string HBXXGKBH { get; set; }

        /// <summary>
        /// 型式核准号
        /// </summary>
        /// <returns></returns>
        public string FDJXSHZZH { get; set; }

        /// <summary>
        /// 发动机编号
        /// </summary>
        /// <returns></returns>
        public string FDJBH { get; set; }

        /// <summary>
        /// 额定功率
        /// </summary>
        /// <returns></returns>
        public string FDJGL { get; set; }

        /// <summary>
        /// 发动机转速
        /// </summary>
        /// <returns></returns>
        public string FDJZS { get; set; }

        /// <summary>
        /// 发动机气缸数
        /// </summary>
        public int? FDJQGS { get; set; }

        /// <summary>
        /// 出厂年月
        /// </summary>
        /// <returns></returns>
        public string FDJCCRQ { get; set; }

        /// <summary>
        /// 制造企业
        /// </summary>
        /// <returns></returns>
        public string FDJZZQY { get; set; }

        /// <summary>
        /// 型号
        /// </summary>
        /// <returns></returns>
        public string FDJXH { get; set; }

        /// <summary>
        /// 附加信息
        /// </summary>
        /// <returns></returns>
        public string FJXX { get; set; }

        /// <summary>
        /// 机身正面照片
        /// </summary>
        /// <returns></returns>
        public string JX1_pic { get; set; }

        /// <summary>
        /// 机身侧面照片
        /// </summary>
        /// <returns></returns>
        public string JX2_pic { get; set; }

        /// <summary>
        /// 机身
        /// </summary>
        /// <returns></returns>
        public string JX3_pic { get; set; }

        /// <summary>
        /// 环保标签照片
        /// </summary>
        /// <returns></returns>
        public string HBBQ_pic { get; set; }

        /// <summary>
        /// 机械环保代码
        /// </summary>
        /// <returns></returns>
        public string JXHBDM_pic { get; set; }

        /// <summary>
        /// 铭牌照片
        /// </summary>
        /// <returns></returns>
        public string JXMP_pic { get; set; }

        /// <summary>
        /// 型式核准证书
        /// </summary>
        /// <returns></returns>
        public string FDJXSHZZS_pic { get; set; }

        /// <summary>
        /// 发动机铭牌
        /// </summary>
        /// <returns></returns>
        public string FDJMP_pic { get; set; }

        /// <summary>
        /// 固定源型号
        /// </summary>
        /// <returns></returns>
        public string gdy_xh { get; set; }

        /// <summary>
        /// 固定源编号
        /// </summary>
        /// <returns></returns>
        public string gdy_bh { get; set; }

        /// <summary>
        /// 固定源额定功率
        /// </summary>
        /// <returns></returns>
        public string gdy_edgl { get; set; }

        /// <summary>
        /// 固定源额定电压
        /// </summary>
        /// <returns></returns>
        public string gdy_eddy { get; set; }

        /// <summary>
        /// 固定源额定电流
        /// </summary>
        /// <returns></returns>
        public string gdy_eddl { get; set; }

        /// <summary>
        /// 固定源相数--3相电还是2相电
        /// </summary>
        /// <returns></returns>
        public string gdy_xs { get; set; }

        public void CopyFromMechanics(MechanicsEntity entity)
        {
            Type t = this.GetType();
            PropertyInfo[] pArray = t.GetProperties();
            Array.ForEach<PropertyInfo>(pArray, p =>
            {
                var propertyp = typeof(MechanicsEntity).GetProperty(p.Name);
                if (propertyp != null)
                {
                    p.SetValue(this, propertyp.GetValue(entity));
                }
            });
        }
    }
}
